module.exports = app => {
    const { STRING, INTEGER, TEXT, DATE, BIGINT, TINYINT } = app.Sequelize;

    const LostAndFound = app.model.define('lost_and_found', {
        item_id: {
            type: BIGINT.UNSIGNED,
            primaryKey: true,
            autoIncrement: true,
        },
        user_id: { type: BIGINT.UNSIGNED, allowNull: false },
        title: { type: STRING(100), allowNull: false },
        description: { type: STRING(255), allowNull: false },
        category: { type: STRING(50), allowNull: false },
        status: { type: TINYINT, allowNull: false, defaultValue: 0 },
        contact_info: { type: STRING(100), allowNull: false },
        created_at: DATE,
        updated_at: DATE,
    }, {
        tableName: 'lost_and_found',
        timestamps: false,
    });

    return LostAndFound;
};